home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / gscript / gs261s.zoo / atari / gdevvdi.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-03  |  2.2 KB  |  71 lines

  1. /* Copyright (C) 1991 Aladdin Enterprises.  All rights reserved.
  2.    Distributed by Free Software Foundation, Inc.
  3.  
  4. This file is part of Ghostscript.
  5.  
  6. Ghostscript is distributed in the hope that it will be useful, but
  7. WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. to anyone for the consequences of using it or for whether it serves any
  9. particular purpose or works at all, unless he says so in writing.  Refer
  10. to the Ghostscript General Public License for full details.
  11.  
  12. Everyone is granted permission to copy, modify and redistribute
  13. Ghostscript, but only under the conditions described in the Ghostscript
  14. General Public License.  A copy of this license is supposed to have been
  15. given to you along with Ghostscript so you can know your rights and
  16. responsibilities.  It should be in a file named COPYING.  Among other
  17. things, the copyright notice and this notice must be preserved on all
  18. copies.  */
  19.  
  20. /* gdevvdi.h */
  21.  
  22. #include "gdevprn.h"
  23. #include "math_.h"
  24. #include <osbind.h>
  25. #include <stdlib.h>
  26. #include <gemdefs.h>
  27. #include <aesbind.h>
  28. #include <vdibind.h>
  29.  
  30. /* Define the default device parameters. */
  31.  
  32. #ifndef X_DPI
  33. #define X_DPI 80
  34. #endif
  35. #ifndef Y_DPI
  36. #define Y_DPI 80
  37. #endif
  38.  
  39. #define WIDTH_10THS    85
  40. #define HEIGHT_10THS    110
  41.  
  42. #define MIN(x, y) ((x <= y) ? x : y)
  43. #define MAX(x, y) ((x >= y) ? x : y)
  44.  
  45. /* Macros for casting the pdev argument */
  46.  
  47. #define ppdev ((gx_device_printer *)pdev)
  48. #define pmemdev ((gx_device_memory *)pdev)
  49.  
  50. #define FULL_WIN  1    /* Redraw the full window. */
  51.  
  52. #define DITH_GRAY(depth)\
  53.   (depth == 16 ? 1535 : depth == 8 ? 39 : depth == 4 ? 7 : depth == 2 ? 2 : 1)
  54.  
  55. #define DITH_RGB(depth)\
  56.   (depth == 16 ? 40 : depth == 8 ? 6 : depth == 4 ? 2 : depth == 2 ? 2 : 1)
  57.  
  58. typedef struct window {
  59.     short handle;    /* window handle */
  60.     short gadgets;    /* which window gadgets are enabled */
  61.     short opened;    /* flag for window state */
  62.     char  *title;    /* pointer to window title */
  63.     GRECT canvas;    /* size of window work area */
  64.     GRECT frame;    /* sized of entire window */
  65.     GRECT oframe;    /* last frame size */
  66.     GRECT mframe;    /* maximum frame size */
  67.     int (*redraw)();    /* routine for window redraw */
  68. } WINDOW;
  69.  
  70. /* end gdevvdi.h */
  71.